<!DOCTYPE html>
<html>

  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<meta http-equiv="Cache-Control" content="no-siteapp" />

    <title>Uses xmake to build c++20 modules</title>
    <meta name="description" content="c++ modules have been officially included in the c++20 draft, and msvc and clang have been basically implemented on modules-ts Support, as c++20’s footsteps ...">

    
    <meta name="keywords" content="xmake,lua,c++20,modules-ts,tboox" /> 

    <!-- qq oauth -->
    <meta property="qc:admins" content="5211601217706727767255" />

    <!--icon -->
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
    <link rel="icon" sizes="192x192" href="/static/img/nice-highres.png" />
	<link rel="apple-touch-icon-precomposed" href="/static/img/apple-touch-icon-57x57-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/static/img/apple-touch-icon-72x72-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/static/img/apple-touch-icon-114x114-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/static/img/apple-touch-icon-144x144-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="180x180" href="/static/img/retinahd_icon.png" />
	<meta name="msapplication-TileImage" content="/static/img/retinahd_icon.png" />
	
    <link rel="stylesheet" href=" /css/fontawesome/css/font-awesome.min.css ">
    <link rel="stylesheet" href=" /css/main.css ">
    <link rel="canonical" href="https://tboox.org/2019/09/22/xmake-c++20-modules/">
    <link rel="alternate" type="application/rss+xml" title="TBOOX Open Source Project" href="https://tboox.org/feed.xml ">
    <link rel="alternate" hreflang="en" href="https://tboox.org/" />
    <link rel="alternate" hreflang="zh-Hans" href="https://tboox.org/cn/" />




    <script type="text/javascript">
    function isPC(){    
        var userAgentInfo = navigator.userAgent;  
        var Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod");    
        var flag = true;    
        for (var v = 0; v < Agents.length; v++) {    
            if (userAgentInfo.indexOf(Agents[v]) > 0) { flag = false; break; }    
        }    
        return flag;    
    }
    </script>

<!-- baidu ads -->



    <!-- baidu ads -->

</head>


  <body>

    <header id="top">
    <div class="wrapper">
        <a href="/" class="brand">TBOOX</a>
        <button id="headerMenu" class="menu"><i class="fa fa-bars"></i></button>
        <nav id="headerNav">
            <ul>
                <li>
                    
                    <a href="/cn?lang=0">
                    
                        <i class="fa fa-home"></i>中文
                    </a>
                </li>

                
                    
                     
                    
                
                    
                     
                     
                    <li>

                        
                            
                            <a href="/project/">
                            
                        
                            <i class="fa fa-bookmark"></i>Projects
                        </a>
                    </li>
                    
                    
                    
                
                    
                     
                    
                
                    
                     
                     
                    <li>

                        
                            
                            <a href="/archive/">
                            
                        
                            <i class="fa fa-archive"></i>Archives
                        </a>
                    </li>
                    
                    
                    
                
                    
                     
                    
                
                    
                     
                     
                    <li>

                        
                            
                            <a href="/category/">
                            
                        
                            <i class="fa fa-th-list"></i>Categories
                        </a>
                    </li>
                    
                    
                    
                
                    
                     
                    
                
                    
                     
                     
                    <li>

                        
                            
                            <a href="/tag/">
                            
                        
                            <i class="fa fa-tags"></i>Tags
                        </a>
                    </li>
                    
                    
                    
                
                    
                
                    
                     
                    
                
                    
                     
                     
                    <li>

                        
                            
                            <a href="/docs/">
                            
                        
                            <i class="fa fa-book"></i>Documents
                        </a>
                    </li>
                    
                    
                    
                
                    
                     
                    
                
                    
                     
                     
                    <li>

                        
                            
                            <a href="https://xmake.io/#/about/contact" target="_blank" >
                            
                        
                            <i class="fa fa-forumbee"></i>Community
                        </a>
                    </li>
                    
                    
                    
                
                    
                     
                    
                
                    
                     
                     
                    <li>

                        
                            
                            <a href="/donation/">
                            
                        
                            <i class="fa fa-heart"></i>Donate
                        </a>
                    </li>
                    
                    
                    
                
                    
                     
                    
                
                    
                     
                     
                    <li>

                        
                            
                            <a href="/about/">
                            
                        
                            <i class="fa fa-user"></i>About
                        </a>
                    </li>
                    
                    
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                     
                     
                    
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            </ul>
        </nav>
    </div>
</header>



        <div class="page clearfix" post>
    <div class="left">
        <h1>Uses xmake to build c++20 modules</h1>
        <div class="label">

            <div class="label-card">
                <i class="fa fa-calendar"></i>2019-09-22
            </div>

            <div class="label-card">
                
            </div>

            <div class="label-card">
                
            </div>

            <div class="label-card">
            


<!-- <span class="point">•</span> -->
<span class="categories">
  <i class="fa fa-th-list"></i>
  
    
        <a href="/category/#xmake" title="Category: xmake" rel="category">xmake</a>
    
  

  <!-- <span class="point">•</span> -->
</span>


            </div>

            <div class="label-card">
            
<!-- <span class="point">•</span> -->
<span class="pageTag">
  <i class="fa fa-tags"></i>
  
    
        <!--a href="/tag/#xmake" title="Tag: xmake" rel="tag">xmake</a-->
        <a href="/tag/#xmake" title="Tag: xmake" rel="tag">xmake</a>&nbsp;
    
        <!--a href="/tag/#lua" title="Tag: lua" rel="tag">lua</a-->
        <a href="/tag/#lua" title="Tag: lua" rel="tag">lua</a>&nbsp;
    
        <!--a href="/tag/#c%2B%2B20" title="Tag: c++20" rel="tag">c++20</a-->
        <a href="/tag/#c++20" title="Tag: c++20" rel="tag">c++20</a>&nbsp;
    
        <!--a href="/tag/#modules-ts" title="Tag: modules-ts" rel="tag">modules-ts</a-->
        <a href="/tag/#modules-ts" title="Tag: modules-ts" rel="tag">modules-ts</a>
    
  

</span>

            </div>

        </div>
        <hr>
        <article itemscope itemtype="http://schema.org/BlogPosting">
        <p>c++ modules have been officially included in the c++20 draft, and msvc and clang have been basically implemented on <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019 /p1103r3.pdf">modules-ts</a> Support, as c++20’s footsteps are getting closer and closer to us, xmake has also begun to support c++modules in advance.</p>

<p>At present xmake has fully supported the implementation of the modules-ts of msvc/clang. For gcc, since its cxx-modules branch is still under development, it has not officially entered the master. I have read the changelog inside, and the related flags are still in the process. Constantly changing, I feel that it has not stabilized, so I have not supported it yet.</p>

<p>For more information about xmake’s progress on c++modules: <a href="https://github.com/xmake-io/xmake/pull/569">https://github.com/xmake-io/xmake/pull/569</a></p>

<ul>
  <li><a href="https://github.com/xmake-io/xmake">Github Source</a></li>
  <li><a href="https://xmake.io/">Official Document</a></li>
</ul>

<h3 id="hello-module">Hello Module</h3>

<p>I will not talk about the introduction of c++modules. This is mainly about how to build a c++modules project under xmake. Let’s look at a simple example:</p>

<div class="language-lua highlighter-rouge"><pre class="highlight"><code><span class="n">target</span><span class="p">(</span><span class="s2">"hello"</span><span class="p">)</span>
    <span class="n">set_kind</span><span class="p">(</span><span class="s2">"binary"</span><span class="p">)</span>
    <span class="n">add_files</span><span class="p">(</span><span class="s2">"src/*.cpp"</span><span class="p">,</span> <span class="s2">"src/*.mpp"</span><span class="p">)</span>
</code></pre>
</div>

<p>The above is a description of the xmake.lua that supports building c++modules files, where <code class="highlighter-rouge">hello.mpp</code> is the module file:</p>

<div class="language-c highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;cstdio&gt;
</span><span class="n">export</span> <span class="n">module</span> <span class="n">hello</span><span class="p">;</span>
<span class="n">using</span> <span class="n">namespace</span> <span class="n">std</span><span class="p">;</span>

<span class="n">export</span> <span class="n">namespace</span> <span class="n">hello</span> <span class="p">{</span>
    <span class="kt">void</span> <span class="n">say</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span><span class="o">*</span> <span class="n">str</span><span class="p">)</span> <span class="p">{</span>
        <span class="n">printf</span><span class="p">(</span><span class="s">"%s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">str</span><span class="p">);</span>
    <span class="p">}</span>
<span class="p">}</span>
</code></pre>
</div>

<p>Main.cpp is the main program that uses the hello module:</p>

<div class="language-c highlighter-rouge"><pre class="highlight"><code><span class="n">import</span> <span class="n">hello</span><span class="p">;</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
    <span class="n">hello</span><span class="o">::</span><span class="n">say</span><span class="p">(</span><span class="s">"hello module!"</span><span class="p">);</span>
    <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
<span class="p">}</span>
</code></pre>
</div>

<p>Next we execute xmake to build this program:</p>

<div class="language-console highlighter-rouge"><pre class="highlight"><code>ruki:hello ruki$ xmake
[0%]: ccache compiling.release src/hello.mpp
[50%]: ccache compiling.release src/main.cpp
[100%]: linking.release hello
build ok!
</code></pre>
</div>

<p>xmake will handle all the details logic internally, for developers, just add the module file <code class="highlighter-rouge">*.mpp</code> as the source file.</p>

<h3 id="module-interface-file">Module Interface File</h3>

<p>The above mentioned <code class="highlighter-rouge">*.mpp</code> is the module interface file name recommended by xmake. In fact, the default suffix names of the compiler files are not uniform. clang is <code class="highlighter-rouge">*.cppm</code>, while msvc is <code class="highlighter-rouge">*.ixx</code>, which is very unfriendly for writing a unified module project across compilers.
Therefore, reference is made to the recommendation method in <a href="https://build2.org/doc/modules-cppcon2017.pdf">build2</a>, and the unified <code class="highlighter-rouge">*.mpp</code> suffix is used to standardize the command of the module project interface under xmake.</p>

<p>Of course, this also supports xmake’s recommended naming scheme. For suffixes such as <code class="highlighter-rouge">*.ixx</code> and <code class="highlighter-rouge">*.cppm</code>, xmake is also fully compatible and can be added directly to <code class="highlighter-rouge">add_files</code>.</p>

<h3 id="compile-parameter-processing">Compile parameter processing</h3>

<h4 id="clang">clang</h4>

<p>Let’s first look at how to handle module construction under clang. We only need to add -v to execute xmake build, we can see all the details parameters:</p>

<div class="language-console highlighter-rouge"><pre class="highlight"><code>ruki:hello ruki$ xmake -v
[0%]: ccache compiling.release src/hello.mpp
/usr/local/bin/ccache /usr/bin/xcrun -sdk macosx clang -c -fmodules-ts --precompile -x c++-module -Qunused-arguments -arch x86_64 -fpascal-strings -fmessage-length=0 - Mmacosx-version-min=10.14 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -o build/.objs/hello/macosx/x86_64/release/ Src/hello.mpp.o.pcm src/hello.mpp
/usr/local/bin/ccache /usr/bin/xcrun -sdk macosx clang -c -fmodules-ts -Qunused-arguments -arch x86_64 -fpascal-strings -fmessage-length=0 -mmacosx-version-min=10.14 - Isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -o build/.objs/hello/macosx/x86_64/release/src/hello.mpp.o build /.objs/hello/macosx/x86_64/release/src/hello.mpp.o.pcm
[ 50%]: ccache compiling.release src/main.cpp
/usr/local/bin/ccache /usr/bin/xcrun -sdk macosx clang -c -fmodules-ts -fmodule-file=build/.objs/hello/macosx/x86_64/release/src/hello.mpp.o. Pcm -Qunused-arguments -arch x86_64 -fpascal-strings -fmessage-length=0 -mmacosx-version-min=10.14 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10 .14.sdk -o build/.objs/hello/macosx/x86_64/release/src/main.cpp.o src/main.cpp
[100%]: linking.release hello
"/usr/bin/xcrun -sdk macosx clang++" -o build/macosx/x86_64/release/hello build/.objs/hello/macosx/x86_64/release/src/hello.mpp.o build/.objs/hello/ Macosx/x86_64/release/src/main.cpp.o -arch x86_64 -mmacosx-version-min=10.14 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14 .sdk -stdlib=libc++ -lz
build ok!
</code></pre>
</div>

<p>We simplify it as follows:</p>

<div class="language-console highlighter-rouge"><pre class="highlight"><code>clang -c -fmodules-ts --precompile -x c++-module -o hello.mpp.o.pcm src/hello.mpp
clang -c -fmodules-ts -o hello.mpp.o hello.mpp.o.pcm
clang -c -fmodules-ts -fmodule-file=hello.mpp.o.pcm -o main.cpp.o src/main.cpp
clang++ -o hello hello.mpp.o main.cpp.o
</code></pre>
</div>

<p><code class="highlighter-rouge">-fmodules-ts</code> is used to enable the c++-modules module standard, <code class="highlighter-rouge">--precompile</code> is used to precompile the module interface file. Since <code class="highlighter-rouge">*.mpp</code> is not the default module interface file name of the compiler, xmake is added. <code class="highlighter-rouge">-x c++-module</code> to force compilation as a module interface file.</p>

<p>Compile the <code class="highlighter-rouge">*.mpp</code> module interface file, and finally generate the <code class="highlighter-rouge">*.pcm</code> module file and finally tell the clang compiler by <code class="highlighter-rouge">-fmodule-file</code>. We define the hello module in main.cpp where we compile, avoid compiling main. A compiler error undefined by the hello module occurs at .cpp.</p>

<p>Finally, clang++ links all object files, including the object files generated by hello.mpp, into the target program.</p>

<h4 id="msvc">msvc</h4>

<p>For the processing under msvc, I will not elaborate, in fact, the whole logic is similar, I will directly paste the execution of the command process:</p>

<div class="language-console highlighter-rouge"><pre class="highlight"><code>Cl.exe -c /experimental:module /module:interface /module:output hello.mpp.obj.pcm /TP -nologo -Fohello.mpp.obj src\\hello.mpp
Cl.exe -c /experimental:module /module:reference hello.mpp.obj.pcm -nologo -Fomain.cpp.obj src\\main.cpp
Link.exe -nologo -dynamicbase -nxcompat -machine:x64 -out:hello.exe hello.mpp.obj main.cpp.obj
</code></pre>
</div>

<h4 id="gcc">gcc</h4>

<p>Originally, I wanted to add gcc to it. Later, I found that gcc support for c++modules is still maintained in an independent branch. I have not yet entered the master. If I want to use it, I have to check the cxx-modules branch code separately. To compile a gcc toolchains that supports c++modules.</p>

<p>And the use of flags inside is often changing, I feel that it has not been completely stabilized, so I am lazy to toss here, when to support the official version of gcc.</p>

<p>For more information on the implementation of gcc’s modules-ts implementation, please refer to: https://gcc.gnu.org/wiki/cxx-modules</p>

<h3 id="other-examples">Other examples</h3>

<p>There are also a lot of engineering examples related to c++modules built into the xmake project. Interested students can refer to the following: <a href="https://github.com/xmake-io/xmake/tree/dev/tests/projects/c%2B%2B/modules">c++module examples</a></p>


        </article>
        <hr>

        <!-- baidu ads -->
        

        
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
                    
                    <h2 id="chinese">中文</h2>
                    <ul>
                    
                    <li class="relatedPost">
                        <a href="/cn/2019/09/22/xmake-c++20-modules/">使用xmake构建c++20 modules
                        
                        </a>
                    </li>
                    
                    
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
        
            
        
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
            
        
            
            
                
            
        
        
            </ul>
        

        
        
            
            
            
                
                    
                        
                        <h2 id="similar_posts">Similar Posts</h2>
                        <ul>
                        
                        <li class="relatedPost">
                            <a href="/2021/12/17/xmake-update-v2.6.2/">Xmake v2.6.2 released, Support building Linux kernel driver module
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
            
        
            
        
            
            
            
                
                    
                        
                        <li class="relatedPost">
                            <a href="/2021/12/03/xmake-update-v2.6.1/">xmake v2.6.1 released, Switch to Lua5.4 runtime, Support Rust and C++ mixed compilation
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
            
        
            
        
            
            
            
                
                    
                        
                        <li class="relatedPost">
                            <a href="/2021/10/30/xmake-update-v2.5.9/">xmake v2.5.9 released, Improve C++20 Modules and support Nim, Keil MDK and Unity Build
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
            
        
            
        
            
            
            
                
                    
                        
                        <li class="relatedPost">
                            <a href="/2021/10/08/xmake-update-v2.5.8/">xmake v2.5.8 is released, Support Pascal/Swig program and Lua53 runtime
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
            
        
            
        
            
            
            
                
                    
                        
                        <li class="relatedPost">
                            <a href="/2021/08/29/xmake-update-v2.5.7/">xmake v2.5.7 released, Use lockfile to freeze package dependencies and Vala/Metal language support
                            
                            </a>
                        </li>
                        
                        
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
                
                    
                
                    
                
                    
                
                    
                
            
            
        
            
        
        
            </ul>
        

        <div class="post-recent">
    <div class="pre">

        

        

        
        
        

        

        

        
        
        <p><strong>Prev Post</strong> <a href="/2019/08/22/xmake-update-v2.2.8/">xmake v2.2.8 released, New vs project generator</a></p>
        
    </div>

    <div class="nex">

        

        

        
        
        

        

        

        
        
        <p><strong>Next Post</strong> <a href="/2019/10/11/update-v1.6.4/">tbox v1.6.4 update, new c11 style atomic operation!</a></p>
        
    </div>
</div>


        <h2 id="comments">Comments</h2>
        






<div id="gitalk-container"></div>
<link rel="stylesheet" href="/css/gitalk.css">
<script src="/js/gitalk.min.js"></script>

<script>
const gitalk = new Gitalk({
  clientID: '73946dc1d9e2276ad0da',
  clientSecret: '12a3cb94361ba3ebc6ecb68cf80d592bfaa8106d',
  repo: 'tboox.github.io',
  owner: 'waruqi',
  admin: ['waruqi'],
  id: location.pathname,      
  language: 'en',
  distractionFreeMode: false  
})

gitalk.render('gitalk-container')
</script>





    </div>
    <button class="anchor"><i class="fa fa-anchor"></i></button>
    <div class="right">
        <div class="wrap">


            <!-- codefund ads -->
            

            <!-- Content -->
            <div class="side content">
                <div>
                    Content
                </div>
                <ul id="content-side" class="content-ul">
                    <li><a href="#chinese">中文</a></li>
                    <li><a href="#similar_posts">Similar Posts</a></li>
                    <li><a href="#comments">Comments</a></li>
                </ul>
            </div>

            <!-- baidu ads -->
            

            <br>
            <div class="side">
                <div>
                    <i class="fa fa-external-link"></i>
                    Links
                </div>
                <ul class="content-ul">
                  <li><a href="http://github.com/waruqi/tbox">tbox</a></li>
                  <li><a href="http://www.xmake.io">xmake</a></li>
                  <li><a href="https://github.com/waruqi">github</a></li>
                </ul>
            </div> 

            <!-- google ads -->
            

            <!-- baidu ads -->
            

            <!-- chitika ads -->
            
        </div>
    </div>

    <!-- baidu ads -->
    
</div>
<script>
/**
 * target _blank
 */
(function() {
    var aTags = document.querySelectorAll('article a:not([id])')
    for (var i = 0; i < aTags.length; i++) {
        aTags[i].setAttribute('target', '_blank')
    }
}());
</script>
<script src="/js/pageContent.js " charset="utf-8"></script>



    <footer class="site-footer">
    <div class="wrapper">
        <p class="description">
             Copyright (c) 2016-2020 tboox.org 
        </p>
        <p class="contact">
            
            <a href="https://github.com/waruqi" title="GitHub"><i class="fa fa-github" aria-hidden="true"></i></a> 
             
            
            <a href="mailto:waruqi@gmail.com" title="email"><i class="fa fa-envelope-o" aria-hidden="true"></i></a> 
            
            
            <a href="https://twitter.com/waruqi" title="Twitter"><i class="fa fa-twitter" aria-hidden="true"></i></a> 
            
            <a href="/feed.xml" title="feed"><i class="fa fa-feed" aria-hidden="true"></i></a> 
        </p>
        <p class="power">
            <span>
                Site powered by <a href="https://jekyllrb.com/">Jekyll</a> & <a href="https://github.com/Gaohaoyang">HyG</a> & <a href="https://pages.github.com/">Github Pages</a>.
            </span>
        </p>
    </div>
</footer>

    <div class="back-to-top">
    <a href="#top" class="scroll">
        <i class="fa fa-arrow-up" aria-hidden="true"></i>
    </a>
</div>

    <script src=" /js/main.js " charset="utf-8"></script>
    <script src=" /js/scroll.min.js " charset="utf-8"></script>
  </body>

</html>
